package com.newzqxq.common.enums;

/**
 * 打款失败枚举
 */
public enum PayCallBackFailCodeEnums {

    INSUFFICIENT_BALANC("INSUFFICIENT_BALANC","账户余额不足"),
    DIRECT_DISBURSEMENT_FAILED("DIRECT_DISBURSEMENT_FAILED","其他，联系官方支持")
    ,INVALID_DESTINATION("INVALID_DESTINATION","目标账户不存在");

    private String code;
    private String message;

    public static PayCallBackFailCodeEnums getByCode(String code){
        for (PayCallBackFailCodeEnums enums: PayCallBackFailCodeEnums.values()){
            if (enums.getCode().equals(code)){
                return enums;
            }
        }
        return null;
    }
    PayCallBackFailCodeEnums(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
